#define _CRT_SECURE_NO_WARNINGS
#include "stack.h"

void testStack()
{
	STNode stn;
	STInit(&stn);
	STPush(&stn, 1);
	STPush(&stn, 2);
	printf("topval:%d\n", STTop(&stn));
	STPush(&stn, 3);
	STPush(&stn, 4);
	printf("elements:%d\n", stn.top);
	while (STSize(&stn))
	{
		printf("%d ", STTop(&stn));
	}
	printf("\nelements:%d\n", stn.top);

	STDestroy(&stn);
}

int main()
{
	testStack();
	return 0;
}